#!/usr/bin/env python
#-_- coding: utf-8 -_-
import os
import time
source = ['/home/sdt01/']
target_dir = '/home/sdt02/'
target = target_dir + time.strftime('%Y%m%d%H%M%S') + '.zip'
zip_command = "zip -qr %s %s" %(target,' '.join(source))
if os.system(zip_command)==0:
  print 'Successful backup '
else:
  print 'Backup failed'
